﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using CruzDelSur.Dominio;
using NHibernate;
using NHibernate.Criterion;

namespace CruzDelSur.Persistencia
{
    public class VehiculoDAO : BaseDAO<Vehiculo, string>, IVehiculoDAO
    {
        public ICollection<Vehiculo> listarVehiculos()
        {
           // return Listar(DetachedCriteria.For(typeof(Vehiculo)));
            ICollection<Vehiculo> resultado = this.Listar(
               DetachedCriteria.For<Vehiculo>().Add(
                   Restrictions.Eq("Tipo", "C")
                  )
               );
            return resultado;
        }
    }
}